home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_teo_mirrordoor.cog < prev    next >
Text File  |  1999-11-15  |  8KB  |  228 lines

  1. # Jones 3D Cog Script
  2. #
  3. # TEO_MirrorDoor.cog
  4. #
  5. # Controls the opening of the final door.
  6. #
  7. # [SXC]
  8. #
  9. # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13.     message     startup
  14.     message     pulse
  15.     message     user0
  16.     
  17.     cog         hintcog
  18.     thing       camera0
  19.     thing       camera0_tgt0
  20.     thing       camera0_tgt1
  21.     thing       spritepos0
  22.     thing       spritepos1
  23.     
  24.     thing       actorindy
  25.     thing       player          local
  26.         
  27.     keyframe    in_activate=in_reach_high.key        local
  28.     keyframe    in_stand1=0in_stand1.key            local
  29.     keyframe    in_stand4=0in_stand4.key            local
  30.     keyframe    in_SideToHips=0in_stand1_bd_4.key   local
  31.     keyframe    in_HipsToSide=0in_stand4_bd_1.key   local
  32.     keyframe    in_shakin=in_wobble.key             local
  33.         
  34.     thing       mirrorobj                           local
  35.     template    mirrortemplate
  36.     template    sparktemplate=redsparks             local
  37.     template    energytemplate=eyecandy             local
  38.     template    sunburst=shs_sunburst               local
  39.     template    glowit=+ripples                     local
  40.     thing       mirrorpos       
  41.     
  42.     material    beamMat=gen_a4sfx_rbbeam_b.mat      local
  43.     thing       lightbeam                           local
  44.     thing       lightshaftbeam
  45.     thing       finalteleportpos
  46.     
  47.     thing       shaft1
  48.     thing       shaft2
  49.     thing       shaft3
  50.     thing       shaft4
  51.     thing       shaft5                  
  52.     
  53.     thing        irisdoor0   linkid=0    mask=0x405
  54.     thing        irisdoor1   linkid=0    mask=0x405
  55.     thing        irisdoor2   linkid=0    mask=0x405
  56.     thing        irisdoor3    linkid=0    mask=0x405
  57.     thing        irisdoor4    linkid=0    mask=0x405
  58.     thing        irisdoor5    linkid=0    mask=0x405
  59.     thing        irisdoor6    linkid=0    mask=0x405
  60.     thing        irisdoor7    linkid=0    mask=0x405
  61.     
  62.     thing       door0
  63.     thing       door1
  64.     
  65.     thing       bolt0
  66.     thing       bolt1
  67.     thing       bolt2
  68.     thing       bolt3
  69.     
  70.     thing       originpos
  71.     thing       targetpos
  72.     thing       sparkpos
  73.     thing       energypos
  74.     thing       safepos
  75.     
  76.     flex        moveSpeed=0.5
  77.     
  78.     vector      originvec                           local
  79.     vector      targetvec                           local
  80.     vector      offsetvec                           local
  81.     vector      mirrorlightrgb                      local
  82.     vector      smallvec                            local
  83.     vector      largevec                            local
  84.     vector      medvec                              local
  85.                                                     
  86.     int         doorcount=0                         local
  87.     int         count=0                             local
  88.     int         in_track0                           local
  89.                                                     
  90.     thing       burst                               local
  91.     thing       glow                                local
  92.     thing       glow2                               local
  93.                                                     
  94.     sound       theme=mus_teo_endmirror.wav         local
  95.     sound       flash=teo_flash_vfx_c.wav           local
  96.     sound       shine=teo_liteshaft_shine_c.wav     local
  97.     sound       mirror_place=teo_mirror_place_c.wav local
  98.     sound       boltsound=teo_sundoor_bolts_c.wav   local
  99.     sound       doorslide=olv_quetzdoor_move_c.wav  local
  100.     sound       doorstop=olv_quetzdoor_stop_c.wav   local
  101.     sound       boltstop=shw_grill_stop.wav         local
  102.     
  103.     int         doorchan_slide                      local
  104. end
  105.  
  106. # ========================================================================================
  107.  
  108. code
  109.  
  110. # ........................................................................................
  111. startup:
  112.     player = GetLocalPlayerThing();
  113.     ThingFadeAnim(lightshaftbeam, 1, 0, 0.1, 0);
  114.     smallvec = VectorSet(0.01, 0.01, 1);
  115.     medvec = VectorSet(0.4, 0.4, 0);
  116.     largevec = VectorSet(1.0, 1.0, 0);
  117.     return;
  118.  
  119. # ........................................................................................
  120. user0:
  121.  
  122.     StartCutscene(1);
  123.     SetActorFlags(player, 0x200000);
  124.     SendMessage(hintcog, user1);
  125.     CopyPlayerHolsters(player, actorindy);
  126.     TeleportThing(player, safepos);    
  127.     //SetThingFlags(player, 0x80000);
  128.     ClearThingFlags(actorindy, 0x80000);
  129.     
  130.     //cut to indy placing object camera
  131.     SetCameraLookInterp(2, 0);
  132.     SetCameraPosInterp(2, 0);
  133.     
  134.     SetCameraFocus(2, camera0);
  135.     SetCameraSecondaryFocus(2, camera0_tgt0);
  136.     SetCurrentCamera(2);
  137.     SetCameraFOV(80, 0, 0);
  138.     Sleep(0.5);
  139.     
  140.     //play the key of him placing the object
  141.     PlayKey(actorindy, in_activate, 4, 0x12, 1);
  142.         
  143.     //create the object
  144.     mirrorobj = CreateThing(mirrortemplate, mirrorpos);
  145.     CaptureThing(mirrorobj);
  146.     ChangeInv(player, 63, -1);
  147.     PlaySoundThing(mirror_place, mirrorobj, 1, 10, 20, 0);
  148.     Sleep(0.5);
  149.     ThingFadeAnim(lightshaftbeam, 0, 1, 0.5, 0);
  150.     PlaySoundThing(shine, lightshaftbeam, 1, 10, 20, 0);
  151.     PlaySoundLocal(theme, 1, 0, 0x0, 0);
  152.     
  153.     //do the effects
  154.     AISetMoveSpeed(actorindy, 1);
  155.     AISetLookThing(actorindy, camera0_tgt1);
  156.     SetCameraLookInterp(2, 1);
  157.     SetCameraInterpSpeed(2, 3);
  158.     Sleep(0.5);
  159.     SetCameraSecondaryFocus(2, camera0_tgt1);
  160.     //SetCameraFOV(90, 1, 2);
  161.     AISetMoveSpeed(actorindy, 3);
  162.     AISetMoveFrame(actorindy, 1);
  163.     AIWaitForStop(actorindy);
  164.     Sleep(1);
  165.     in_track0 = PlayKey(actorindy, in_stand4, 2, 0x00, 0);
  166.     PlayKey(actorindy, in_SideToHips, 4, 0x12, 0);
  167.     SetCameraFOV(60, 1, 5);
  168.     //Sleep(2);
  169.     
  170.     PlaySoundThing(boltsound, bolt3, 1, 10, 20, 0);
  171.     For(count = 0; count <= 4; count=count + 1)
  172.         {
  173.             MoveToFrame(bolt0[count], 1, moveSpeed);
  174.         }
  175.     WaitForStop(bolt3);
  176.     PlaySoundThing(boltstop, bolt3, 1, 10, 20, 0);
  177.     burst=CreateThing(sunburst, spritepos0);
  178.     CaptureThing(burst);
  179.     PlaySoundThing(flash, burst, 1, 10, 20, 0);
  180.     AnimateSpriteSize(burst, smallvec, medvec, 0.25);
  181.     CreateThing(energytemplate, spritepos0);
  182.     Sleep(0.25);
  183.     glow=CreateThing(glowit, spritepos1);
  184.     CaptureThing(glow);
  185.     AnimateSpriteSize(glow, smallvec, largevec, 0.5);
  186.     Sleep(0.2);
  187.     glow2=CreateThing(glowit, spritepos1);
  188.     CaptureThing(glow2);
  189.     AnimateSpriteSize(glow2, smallvec, largevec, 0.5);
  190.     MoveToFrame(door0, 1, moveSpeed);
  191.     MoveToFrame(door1, 1, moveSpeed);
  192.     doorchan_slide = PlaySoundThing(doorslide, door0, 1, 10, 20, 1);
  193.     for (doorcount=0; doorcount<=7; doorcount=doorcount+1)
  194.         {
  195.             MoveToFrame(irisdoor0[doorcount], 0, 2);
  196.         }
  197.     Sleep(0.5);
  198.     //DestroyThing(lightbeam);
  199.     //SetPulse(0);
  200.     ThingFadeAnim(lightshaftbeam, 1, 0, 0.5, 0);
  201.     for (count=0; count<=4; count=count+1)
  202.         {
  203.             ThingFadeAnim(shaft1[count], 1, 0, 0.1, 0);
  204.         }
  205.     StopKey(actorindy, in_track0, 0.5);          
  206.     WaitForStop(door0);
  207.     StopSound(doorchan_slide, 0);
  208.     PlaySoundThing(doorstop, door0, 1, 10, 20, 0);
  209.     SetCameraLookInterp(2, 0);
  210.     SetCameraInterpSpeed(2, 0);
  211.     SetCameraPosInterp(2, 0);           
  212.     Sleep(1);
  213.     CopyOrient(actorindy, player);
  214.     TeleportThing(player, actorindy);         
  215.     //ClearThingFlags(player, 0x80000);            
  216.     SetThingFlags(actorindy, 0x80000);
  217.     SetCurrentCamera(1);
  218.     SetCameraFOV(90, 0, 0);                         
  219.     EndCutscene();                  
  220.     ClearActorFlags(player, 0x200000);             
  221.     
  222. return;
  223.  
  224. # ........................................................................................
  225.  
  226. end
  227.  
  228.